﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Ink;

namespace PaintApplication
{
    /// <summary>
    /// Logique d'interaction pour Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();
            handler = new AbstractEventHandler(this);
        }

        AbstractEventHandler handler;

        private void InkCanvas_StrokeCollected(object sender, RoutedEventArgs e)
        {
            handler.InkCanvas_StrokeCollected(sender,(InkCanvasStrokeCollectedEventArgs)e);
        }

        private void Rectangle_MouseDown(object sender, RoutedEventArgs e)
        {
            handler.Rectangle_MouseDown(sender,(MouseButtonEventArgs) e);
        }

        private void DrawButton_Click(object sender, RoutedEventArgs e)
        {
            handler.DrawButton_Click(sender, e);
        }

        private void EraseButton_Click(object sender, RoutedEventArgs e)
        {
            handler.EraseButton_Click(sender, e);
        }

        private void Window_SizeChanged(object sender, RoutedEventArgs e)
        {
            handler.Window_SizeChanged(e, (SizeChangedEventArgs)e);
        }

        private void TextBox_TextChanged(object sender, RoutedEventArgs e)
        {
            handler.TextBox_TextChanged(sender,(TextChangedEventArgs) e);
        }

        private void TextBox_KeyDown(object sender, RoutedEventArgs e)
        {
            handler.TextBox_KeyDown(sender, (KeyEventArgs)e);
        }

    }
}
